<template>
  <div class="main_info">
    <div class="label_title">
      <p>营业执照信息</p>
    </div>
    <div class="flex flex-wrap list_info">
      <div class="list_item">
        <label>公司名称：</label>
        <p>{{infoData.mechanism}}</p>
      </div>
      <div class="list_item">
        <label>工商注册号：</label>
        <p>{{infoData.companyid}}</p>
      </div>
      <div class="list_item">
        <label>公司所在区域：</label>
        <p>{{infoData.company_area}}</p>
      </div>
      <div class="list_item">
        <label>公司地址：</label>
        <p>{{infoData.company}}</p>
      </div>
      <div class="list_item">
        <label>营业执照：</label>
        <div v-if="infoData.shopcard">
          <crop-upload
            ref="cropUpload"
            show-type="photo"
            :init-val="infoData.shopcard"
            wrapper-width="95px"
            wrapper-height="95px"
            :photo-width="95"
            :photo-height="95"
            :hideDelete="true"
          ></crop-upload>
        </div>
        <p v-else>暂未上传</p>
      </div>
      <div class="list_item">
        <label>公司门头照：</label>
        <div v-if="infoData.doorphoto">
          <crop-upload
            ref="cropUpload"
            show-type="photo"
            :init-val="infoData.doorphoto"
            wrapper-width="95px"
            wrapper-height="95px"
            :photo-width="95"
            :photo-height="95"
            :hideDelete="true"
          ></crop-upload>
        </div>
        <p v-else>暂未上传</p>
      </div>
      <div class="list_item">
        <label>公章图片：</label>
        <div v-if="infoData.seal_url">
          <crop-upload
            ref="cropUpload"
            show-type="photo"
            :init-val="infoData.seal_url"
            wrapper-width="95px"
            wrapper-height="95px"
            :photo-width="95"
            :photo-height="95"
            :hideDelete="true"
          ></crop-upload>
        </div>
        <p v-else>暂未上传</p>
      </div>
    </div>
    <div class="label_title">
      <p>法人证件信息</p>
    </div>
    <div class="flex flex-wrap list_info">
      <div class="list_item">
        <label>法人姓名：</label>
        <p>{{infoData.faname}}</p>
      </div>
      <div class="list_item">
        <label>法人身份证号：</label>
        <p>{{infoData.idcard}}</p>
      </div>
      <div class="list_item">
        <label>身份证正面照：</label>
        <div v-if="infoData.faidcard">
          <crop-upload
            ref="cropUpload"
            show-type="photo"
            :init-val="infoData.faidcard"
            wrapper-width="95px"
            wrapper-height="95px"
            :photo-width="95"
            :photo-height="95"
            :hideDelete="true"
          ></crop-upload>
        </div>
        <p v-else>暂未上传</p>
      </div>
      <div class="list_item">
        <label>身份证背面照：</label>
        <div v-if="infoData.faidcard_back">
          <crop-upload
            ref="cropUpload"
            show-type="photo"
            :init-val="infoData.faidcard_back"
            wrapper-width="95px"
            wrapper-height="95px"
            :photo-width="95"
            :photo-height="95"
            :hideDelete="true"
          ></crop-upload>
        </div>
        <p v-else>暂未上传</p>
      </div>
    </div>
  </div>
</template>
<script>
import cropUpload from "@/components/cropUpload";
import { shopMainInfo } from "@/api/shop";
export default {
  components: { cropUpload },
  data() {
    return {
      infoData: {}
    }
  },
  methods: {
    getData() {
      shopMainInfo().then(res => {
        this.infoData = res || {};
      })
    }
  },
  mounted() {
    this.getData();
  }
}
</script>
<style>
</style>